//
//  MyViewController.h
//  Indie1031
//
//  Created by Michael Jablonski on 1/18/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Reachability.h"

@class AudioStreamer, AboutViewController;

@interface MyViewController : UIViewController {
	UIActivityIndicatorView *loadingIndicatorView;
	AudioStreamer *streamer;
	UIToolbar *toolbar;
	UIBarButtonItem *playItem;
	UIBarButtonItem *pauseItem;
	UIBarButtonItem *spacerItem;
	UIBarButtonItem *infoItem;
	UIButton *aboutButton;
	UILabel *metaDataLabel;
	
	AboutViewController *aboutViewController;
	
	NetworkStatus remoteHostStatus;
	NetworkStatus internetConnectionStatus;
	NetworkStatus localWiFiConnectionStatus;
	
	NSTimer *timer;
}

@property (nonatomic, retain) IBOutlet UIActivityIndicatorView *loadingIndicatorView;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *playItem;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *pauseItem;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *spacerItem;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *infoItem;

@property (nonatomic, retain) IBOutlet UIToolbar *toolbar;
@property (nonatomic, retain) IBOutlet UIButton *aboutButton;
@property (nonatomic, retain) IBOutlet UILabel *metaDataLabel;

@property (nonatomic, retain) AboutViewController *aboutViewController;

@property (nonatomic, retain) NSTimer *timer;

- (IBAction) startStream:(id)sender;
- (IBAction) stopStream:(id)sender;
- (void) startStopStream;

- (IBAction) showAbout:(id)sender;

@property NetworkStatus remoteHostStatus;
@property NetworkStatus internetConnectionStatus;
@property NetworkStatus localWiFiConnectionStatus;
- (void)updateStatus;
- (BOOL)verifyConnection;
- (void)reconnectStream;
@end
